package cn.sz.hy.logic.strategy.vo;

import cn.sz.hy.common.Globel;

public class SheetItem {
	private String name;
	private int column;
	private int linkType;
	private SheetItem mappingItem;
	private TableVo patent;

	public SheetItem() {
		super();
	}

	public SheetItem(String name, int column) {
		super();
		this.name = name;
		this.column = column;
	}

	public SheetItem(String name, int column, int linkType,
			SheetItem mappingItem) {
		super();
		this.name = name;
		this.column = column;
		setMappingItem(mappingItem, linkType);
	}

	public TableVo getPatent() {
		return patent;
	}

	public void setPatent(TableVo patent) {
		this.patent = patent;
	}
	
	

	public void setLinkType(int linkType) {
		this.linkType = linkType;
	}

	public int getColumn() {
		return column;
	}

	public void setColumn(int column) {
		this.column = column;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getLinkType() {
		return linkType;
	}

	public SheetItem getMappingItem() {
		return mappingItem;
	}

	public void setMappingItem(SheetItem mappingItem, int type) {
		this.mappingItem = mappingItem;
		this.linkType = type;
		if (Globel.KEY_LINK == type) {
			patent.addKey(column);
			mappingItem.getPatent().addKey(mappingItem.getColumn());
		}
	}

}
